<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/shoppingCart.css">
    <script src="../lib/jquery-1.12.4.js"></script>
    <script src="../lib/template-web.js"></script>
</head>
<body>
    <div class="heard">
        <div class="logo">
            <img src="../images/mi-logo.png" alt="">
        </div>
        <h2>我的购物车</h2>
    </div>
    <div id="com">
        <ul class="tit">
            <li>商品名称</li>
            <li>单价</li>
            <li>数量</li>
            <li>小计</li>
            <li>操作</li>
        </ul>
        <div class="shoppc">

        </div>
        <ul class="settlements">
            <li><a href="../pages/index.html">继续购物</a></li>
            <li>合计0元</li>
            <li><a href="">去结算</a></li>
        </ul>
    </div>
    <script type="text/template" id="shoppingCart">
        {{each json}}
        <ul>
            <li>{{$value.product_id}}</li>
            <li>
                <a href="">
                    <img src="{{$value.product_img}}" alt="">
                    <p>{{$value.product_name}}</p>
                </a>
            </li>
            <li>
                {{$value.product_price}}
            </li>
            <li>
                <span>
                    <a href="javascript:void(0)" class="reduce">-</a>
                    <em class="num">{{$value.product_num}}</em>
                    <a href="javascript:void(0)" class="add">+</a>
                </span>
            </li>
            <li><%=$value.product_num*$value.product_price%></li>
            <li ><a href="javascript:void(0)" class="dele">X</a> </li>
        </ul>
        {{/each}}
    </script>
    <script src="../js/shoppingCart.js"></script>
</body>
</html>